import Cookies from 'js-cookie'

const TokenKey = 'Base-Admin-Token'

const ExpiresInKey = 'Base-Admin-Expires-In'

const WearthToken = 'wearth-token'

const WearthTime = 'wearth-time'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getExpiresIn() {
  return Cookies.get(ExpiresInKey) || -1
}

export function setExpiresIn(time) {
  return Cookies.set(ExpiresInKey, time)
}

export function removeExpiresIn() {
  return Cookies.remove(ExpiresInKey)
}

export function setWearthToken(token) {
  return Cookies.set(WearthToken, token)
}

export function getWearthToken() {
  return Cookies.get(WearthToken)
}

export function removeWearthToken() {
  return Cookies.remove(WearthToken)
}

export function setWearthTime(token) {
  return Cookies.set(WearthTime, token)
}

export function getWearthTime() {
  return Cookies.get(WearthTime)
}

export function removeWearthTime() {
  return Cookies.remove(WearthTime)
}
